UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '19t0KjAtyFXSXirbVHdWQZfWt9hXi5lchDl14Q3s688='
WHERE
key_id = '1fc7ab3b7369169b177b5bbc4d0ce99ee7b1589f55002f4c67d225c15fcfc1f7'
AND (
token = '19t0KjAtyFXSXirbVHdWQZfWt9hXi5lchDl14Q3s688='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)