UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '++GFz37/dmCm7NESa6KqaD/fFQbDFzF4lEEkwo86PCE=' 
WHERE 
  key_id = 'eb7aad5ad0fffaacd0b65b3e0c97d86d7079615fbfc2cc4de4efeac0d78f6e36' 
  AND (
    token = '++GFz37/dmCm7NESa6KqaD/fFQbDFzF4lEEkwo86PCE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058