UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Oig1Kqg+Svk8SJcTYgZpUzTVGjq7QiKt/evntnaZk4='
WHERE
key_id = '280ccca001bda94aea177617bfcbaf22ccaeb0b385dd80f1ee802abf86e64126'
AND (
token = '+Oig1Kqg+Svk8SJcTYgZpUzTVGjq7QiKt/evntnaZk4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)