UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DHnq2g3qsySCtdmbIn8wEuphnjCWxyk0RfQvQrD73Kc='
WHERE
key_id = 'df01660a4b9fe33f4fb0bc330e47a91f5f03cd687bfb507fc749e0f561bb9acb'
AND (
token = 'DHnq2g3qsySCtdmbIn8wEuphnjCWxyk0RfQvQrD73Kc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)