UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pAYdbTdmv3eUtJz5Hm29urwAGihKIH7l+pOKKB0LZNI=' 
WHERE 
  key_id = '3c16d8a12847f0484dbe33fa589962854b76a9d2ac5683a3c48ce7c353e833a3' 
  AND (
    token = 'pAYdbTdmv3eUtJz5Hm29urwAGihKIH7l+pOKKB0LZNI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036