UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/VktrJBLrt6lzbGnoZ5tJy4rKlyyzSfD4C/bFvarXnQ='
WHERE
key_id = 'a183cf3ce0759511f9b96e5db439d0136aaca6e5795c3cfc960d271156a71c35'
AND (
token = '/VktrJBLrt6lzbGnoZ5tJy4rKlyyzSfD4C/bFvarXnQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)