UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kBMpIb3xm6yNMyZZWjezgDCRflxuaiCbJ+R8WtooGw4='
WHERE
key_id = 'e5a5f007060ca60b035e59021c6732429b25251864a8aa5959a04d29e754d4ba'
AND (
token = 'kBMpIb3xm6yNMyZZWjezgDCRflxuaiCbJ+R8WtooGw4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)