UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pIuxsHGDXA/ikOLFORLjwWEN26JoFrKqXbktWbTIDVA='
WHERE
key_id = '5a2b9cfde3a40cb78ab3e0723f3bc38f2ad74edfd015d975ba377f55cd037cc1'
AND (
token = 'pIuxsHGDXA/ikOLFORLjwWEN26JoFrKqXbktWbTIDVA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)