UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UjcFxPAQZL9mrSrwyINvbBuRFX+r3RVNIKpm3LY5dZE=' 
WHERE 
  key_id = 'eacab603215d0e98b34c9ab2f984ffb9da47a14bfbff4a9ab339c02cfbe722e0' 
  AND (
    token = 'UjcFxPAQZL9mrSrwyINvbBuRFX+r3RVNIKpm3LY5dZE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031