UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Scy3dJzpclecmwkqs8MmpOLAZgt+3XwYp/bBlXAPXc4='
WHERE
key_id = '2bc2d4c1f43ccd9234ba3abeb380f2fb8508d77f33bc7d55b4128461e5237d96'
AND (
token = 'Scy3dJzpclecmwkqs8MmpOLAZgt+3XwYp/bBlXAPXc4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)