UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l8ICIuzzVzsE+9JkGrDKtRrGD6SIF/POuugWmJyr4/I='
WHERE
key_id = '43757cca631fa046c166d8af0e5772422a8773b2fc6b61581279b0ad8bf501e6'
AND (
token = 'l8ICIuzzVzsE+9JkGrDKtRrGD6SIF/POuugWmJyr4/I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)