UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M4LkCBLycVO42S/gZfNvMKDQgqS7lePDQuzssR++rVE='
WHERE
key_id = '556b587a88aa2c2c787bda49dd71f3a408c8dc65283f146aadbeebb4062e621c'
AND (
token = 'M4LkCBLycVO42S/gZfNvMKDQgqS7lePDQuzssR++rVE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)