UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+OvUsqpFh8YSBPLfGNFtgLJSy76go+b/crGXRURNF1s='
WHERE
key_id = '933985b0dc6133307d8c79920ac44614008e7d4150956c2decb5f715363e3ecd'
AND (
token = '+OvUsqpFh8YSBPLfGNFtgLJSy76go+b/crGXRURNF1s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)