UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5pqQyUP2YmLVpfuV1RX5LMX3eD9t7TOIX6/LK5R4ubQ='
WHERE
key_id = 'cc0e440e49be709c187bae557642dc6a9df604c12a828596a8c209b1a1886d71'
AND (
token = '5pqQyUP2YmLVpfuV1RX5LMX3eD9t7TOIX6/LK5R4ubQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)