UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mh6jxnF8BwVD6QcfUxy9eDHcUPTIJeS/BJ1+KyCp2NE='
WHERE
key_id = '6b264aadc2b296558669d3b1e1a3d53bc84df4c687aabb69d5801333999a78cb'
AND (
token = 'mh6jxnF8BwVD6QcfUxy9eDHcUPTIJeS/BJ1+KyCp2NE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)