UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WMVOu3r+FP1uMDf7/pi4Em3tqvVivuZXy7U1X4/775E='
WHERE
key_id = 'cce85ebbbca5dcbeaa0c423103371945de5251637931f6016ec8efc25cec1145'
AND (
token = 'WMVOu3r+FP1uMDf7/pi4Em3tqvVivuZXy7U1X4/775E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)