UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TFFPDHV5rsBbWVly84oJCKnLLUW5f9wux/B5cXdWblo='
WHERE
key_id = '70ae4ab331007152f3c4be4f53480ce3321b9b98fb7a3746ed313ccff9189cb4'
AND (
token = 'TFFPDHV5rsBbWVly84oJCKnLLUW5f9wux/B5cXdWblo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)