UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'h+kHoaJmEp0vVF+P2XJXrbD+tHBwsAh9XBzI80kTVHA='
WHERE
key_id = '63277fcd2c7cb38d2b9167c58f3f894d29cd6b3ff24b527874eef85b7a5888af'
AND (
token = 'h+kHoaJmEp0vVF+P2XJXrbD+tHBwsAh9XBzI80kTVHA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)