UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IGXzKWvmX89wM9l2/CtdcwG4W1ffeJ7Pa/wDclEKwNU='
WHERE
key_id = 'ad3f55b0fe3af658672d57abe11045fba911a970402502d9170e1207cf56669c'
AND (
token = 'IGXzKWvmX89wM9l2/CtdcwG4W1ffeJ7Pa/wDclEKwNU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)