UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IuObhdX8WgVbaR3FjHB6XNdLreSw5WKvx3lhi/q/amA='
WHERE
key_id = '7134612668cd4cc116dda3eb0000daca271a48705dc987d4f288f3bda3f6f64a'
AND (
token = 'IuObhdX8WgVbaR3FjHB6XNdLreSw5WKvx3lhi/q/amA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)