UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+DS+mIFhveZpT+O3yZVBGLGvjJVUhu4UXtdBlzZ+Sks='
WHERE
key_id = 'b4e3298a30b34e0a632f9cd4331bef9d278627ba10041d7149585dddb2f05217'
AND (
token = '+DS+mIFhveZpT+O3yZVBGLGvjJVUhu4UXtdBlzZ+Sks='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)