UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'alqddu77JXnvy1V/bRX2fSNBA6bMCm9IG/7RDfZB2sM='
WHERE
key_id = 'e2528c36469957788561bc5778834908951be15b88178af0be999ec99eff2b95'
AND (
token = 'alqddu77JXnvy1V/bRX2fSNBA6bMCm9IG/7RDfZB2sM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)