UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8pQQ2HQu0zwWxeUVYq2vPc4bNFWg2Go4qK5M/VDRQNc='
WHERE
key_id = '8c56d71c3b1bee3dd7093f07e1ebc53402bf5b57f0d36f61e33b86d848271a19'
AND (
token = '8pQQ2HQu0zwWxeUVYq2vPc4bNFWg2Go4qK5M/VDRQNc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)