UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zOsAljbOMUmFjxHKPeqZu249IHmLjsUfLIO/yfSFv6c='
WHERE
key_id = '0bf34dbf0d47abe142dc837bd1d637a1a19329af3c5bb4944b8e5e886dba15b4'
AND (
token = 'zOsAljbOMUmFjxHKPeqZu249IHmLjsUfLIO/yfSFv6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)