UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'k1fHHCM19WU/895BT1yEg6K9VzS/I0954QHyK9g00DQ='
WHERE
key_id = '45061867a03a7d0ee5fcfea1fbf4f0bb6e329758cb430b95fa949d00b36f576a'
AND (
token = 'k1fHHCM19WU/895BT1yEg6K9VzS/I0954QHyK9g00DQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)