UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'glqelrHS+IFEDM+2oVHGXJUuPqQtbWN7FcVcMVvp25I='
WHERE
key_id = '83ebd493e17ab530fb9ef4d3f43bc167783ea351a2a0a9890e4d616e1efb6e61'
AND (
token = 'glqelrHS+IFEDM+2oVHGXJUuPqQtbWN7FcVcMVvp25I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)