UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'URRQBjp8POG3xcHyzNjaEXVfO7iBMg+MLDCCB43i5p8=' 
WHERE 
  key_id = '61535fa23c712b3f433ba5e2f6c5c6f883bf942d848972365e0b209ec46ef1d0' 
  AND (
    token = 'URRQBjp8POG3xcHyzNjaEXVfO7iBMg+MLDCCB43i5p8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00227