UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kcxkQ+VbdE4PPEfG92oFpxLYU/Pg+yCUjawDH0iPdUo='
WHERE
key_id = '9fe754c25f82862c5df5ec7c9598fc33fa05c1805f4dabe8ec35573f49adc480'
AND (
token = 'kcxkQ+VbdE4PPEfG92oFpxLYU/Pg+yCUjawDH0iPdUo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)