UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UVkR9sKmRwhnbwCWins3pVcJv/91m3c75/ulWlLPCDo='
WHERE
key_id = 'b6e428debf0d9149956e28a7022da71cf1c0e44ec9c6ab15d4de5925ccf782fd'
AND (
token = 'UVkR9sKmRwhnbwCWins3pVcJv/91m3c75/ulWlLPCDo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)