UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+VTw75c7W644GwnNVL8egnjpS9ikeu568Ae5XyIvGmk='
WHERE
key_id = '3324d37c8b7033c7d8c6679eebd5a2bed913d42c06d01a4220a902d62ef65a33'
AND (
token = '+VTw75c7W644GwnNVL8egnjpS9ikeu568Ae5XyIvGmk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)