UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GCd6pJQ3t26tY2JEl0hL9rWxgwdBa1Jh6KgVClPaNL4=' 
WHERE 
  key_id = 'ceb155e1df9330a5ddc2c74784adecd61ff6887168a1d8c704cb8af9778d0f06' 
  AND (
    token = 'GCd6pJQ3t26tY2JEl0hL9rWxgwdBa1Jh6KgVClPaNL4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050