UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rIaabhnOC7VdrTOfCdel+jchN0oaMuFsCq9GINxEhXs=' 
WHERE 
  key_id = '468ca4194726515a4203fc09359a0baae7db216892ecda72b4cd5712024fc10e' 
  AND (
    token = 'rIaabhnOC7VdrTOfCdel+jchN0oaMuFsCq9GINxEhXs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030