UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o8mYVMN2p6/HjoLd4I/rBD7zO/DJwOUr+oRBqHtzhLg='
WHERE
key_id = 'f169ec3c41dcf4ca594b0fd09d8a1fc2c7ffeec000290f36edc0ec9fcf306859'
AND (
token = 'o8mYVMN2p6/HjoLd4I/rBD7zO/DJwOUr+oRBqHtzhLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)