UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5/pIFoMEE5nvRWhv6tTRpU5wOPOrERaRsX6qXBaBJQc='
WHERE
key_id = '126342a1825e602abc619e154f024fa79af33bd6a0fd9fe1457271da4dca6685'
AND (
token = '5/pIFoMEE5nvRWhv6tTRpU5wOPOrERaRsX6qXBaBJQc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)