UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GVY2bB+5TlyERhTqrXUGJJc3d70dhDHsUAH1Nl6D8pQ=' 
WHERE 
  key_id = 'e0c6f9c05ac82fc88dff7857fe6d234eccf722b587e8c7ddd94fe040b37a88d9' 
  AND (
    token = 'GVY2bB+5TlyERhTqrXUGJJc3d70dhDHsUAH1Nl6D8pQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060