UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Ae5hsHp4UMCN8i37t8+fsx32KS4WDlUhaXKlIvKFzA='
WHERE
key_id = '23b8bf048a230d9dd0b2068555e00f2050dd91b88d691686156d7bc2d93f68c5'
AND (
token = '1Ae5hsHp4UMCN8i37t8+fsx32KS4WDlUhaXKlIvKFzA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)