UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IzabveAL08kewP07MJDdL+gFo3sDoSrADDWBftnUXAM='
WHERE
key_id = 'eab24b749a46e1a5477e8c6483314d74d29a4e8219eafd8d60db95aa675710f4'
AND (
token = 'IzabveAL08kewP07MJDdL+gFo3sDoSrADDWBftnUXAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)