UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vDJXtoDxlnugXw4XiZ8xRZYk1f4BAz1Juz/Sb/ZQn2k='
WHERE
key_id = 'ef635ef73ddb4d666d3c87d9a88afaf0c20d8560b8f33f8dde3346771d86ca48'
AND (
token = 'vDJXtoDxlnugXw4XiZ8xRZYk1f4BAz1Juz/Sb/ZQn2k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)