UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OFDxmGPpSB1rn1ZZPpd426NroQM3/TwbJMU48xyq7ic='
WHERE
key_id = '5602e8a7f15d8307a44db37a55395abc8dbf5f70553c418e367bedc4751a8825'
AND (
token = 'OFDxmGPpSB1rn1ZZPpd426NroQM3/TwbJMU48xyq7ic='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)